import request from'./index.js'
// 轮播
export const getBanner = ()=>{
    return request('/release/banner','get',{type:2})
}
// 推荐歌单
export const suggestSongList = ()=>{
    return request('/release/personalized','get',{limit:6})
}
// 推荐新音乐
export const getNewSongList = ()=>{
    return request('/release/personalized/newsong','get',{limit:10})
}
// 获取歌单所有歌曲
export const getMusicList = (id)=>{
    return request('/release/playlist/track/all','get',{id})
}
// 获取歌单详情
export const getMusicListInfo = (id)=>{
    return request('/release/playlist/detail','get',{id,timestamp:Date.now()})
}
// 是否可用
export const isUseSong = (id)=>{
    return request('/release/check/music','get',{id})
}
// 默认搜索关键词
export const keyDefault = ()=>{
    return request('/release/search/default','get')
}

// 搜索建议
export const searchSuccess = (keywords,type='mobile')=>{
    return request('/release/search/suggest','get',{keywords,type})
}
// 热搜榜
export const hotSearch = ()=>{
    return request('/release/search/hot/detail','get')
}
// 主播榜
export const anchorList = (limit=18)=>{
    return request('/release/dj/toplist/hours','get',{limit})
}
// 搜索结果
export const searchResult = ({keywords,type=1,limit=15,offset=0})=>{
    return request('/release/cloudsearch','get',{keywords,type,limit,offset})
}
// 获取视频播放地址
export const getVideoUrl = (id)=>{
    return request('/release/video/url','get',{id})
}
// 网友推荐歌单
export const getPlayList = (limit=6)=>{
    return request('/release/top/playlist','get',{limit})
}
// 获取视频详情
export const getVideoDetail = (id)=>{
    return request('/release/video/detail','get',{id})
}
// 资源点赞
export const sourceLikes = ({type,t,id})=>{
    return request('/release/resource/like','get',{type,t,id}) 
}
// 获取点过赞的视频

// 获取资源评论
export const getSourceCommon = (obj)=>{
    return request('/release/comment/new','get',{...obj,timestamp:Date.now()}) 
}
